package com.tlgen.coopera.factory;

import com.tlgen.coopera.model.BeatRegistryServer;
import com.tlgen.coopera.model.RegistryServer;

import java.util.ArrayList;
import java.util.List;

public class RegistryLocalFactory {

    private List<RegistryServer> registryList = new ArrayList<>();
    private List<BeatRegistryServer> beatList = new ArrayList<>();

    private RegistryLocalFactory() {
    }

    private static class ConfigLocalFactoryInstance {
        private static final RegistryLocalFactory instance = new RegistryLocalFactory();
    }

    public static final RegistryLocalFactory getInstance() {
        return ConfigLocalFactoryInstance.instance;
    }

    public List<RegistryServer> getRegistryList() {
        return registryList;
    }

    public synchronized void setRegistryList(List<RegistryServer> registryList) {
        this.registryList = registryList;
    }

    public List<BeatRegistryServer> getBeatList() {
        return beatList;
    }

    public void setBeatList(List<BeatRegistryServer> beatList) {
        this.beatList = beatList;
    }

}
